<?php
 //材料及硬度
$HBS = [
    "HT-200"=>['min'=>170,'max'=>241, 'a'=>0],
    "HT-300"=>['min'=>187,'max'=>255, 'a'=>1],
    "HT-350"=>['min'=>197,'max'=>169, 'a'=>2],
    "QT500-7-正火"=>['min'=>170,'max'=>230, 'a'=>3],
    "QT600-3-正火"=>['min'=>190,'max'=>270, 'a'=>4],
    "ZG310-570-正火"=>['min'=>163,'max'=>197, 'a'=>5],
    "ZG340-640-正火"=>['min'=>169,'max'=>207, 'a'=>6],
    "45-正火"=>['min'=>162,'max'=>217, 'a'=>7],
    "45-调质"=>['min'=>197,'max'=>269, 'a'=>8],
    "ZG35SiMn-正火-h"=>['min'=>163,'max'=>217, 'a'=>9],
    "ZG35SiMn-调质"=>['min'=>197,'max'=>248, 'a'=>10],
    "ZG35CrMnSi-正火-h"=>['min'=>162,'max'=>217, 'a'=>11],
    "ZG35CrMnSi-调质"=>['min'=>162,'max'=>217, 'a'=>11.5],
    "35CrMo-调质"=>['min'=>241,'max'=>286, 'a'=>12],
    "40MnB-调质"=>['min'=>241,'max'=>286, 'a'=>13],
    "37SiMn2MoV-调质"=>['min'=>241,'max'=>302, 'a'=>14],
    "40Cr-调质"=>['min'=>241,'max'=>302, 'a'=>8],
    "ZG35SiMn-正火或调质-表面淬火"=>['min'=>450,'max'=>530, 'a'=>15],
    "45-正火或调质-表面淬火"=>['min'=>400,'max'=>500, 'a'=>16],
    "35CrMo-调质-表面淬火"=>['min'=>450,'max'=>550, 'a'=>17],
    "40MnB-调质-表面淬火"=>['min'=>450,'max'=>550, 'a'=>18],
    "37SiMn2MoV-调质-表面淬火"=>['min'=>500,'max'=>550, 'a'=>19],
    "40Cr-调质-表面淬火"=>['min'=>480,'max'=>550, 'a'=>20],
    "20Cr-渗碳-淬火-回火"=>['min'=>560,'max'=>620, 'a'=>21],
    "20CrMnTi-渗碳-淬火-回火"=>['min'=>560,'max'=>620, 'a'=>22],
    "38CrMoAiA-调质-短期气体或液体氮化硬度<450"=>['min'=>300,'max'=>450, 'a'=>23],
    "38CrMoAiA-调质-短期气体或液体氮化硬度>450"=>['min'=>450,'max'=>850, 'a'=>24],
    "38CrMoAiA-调质-长期气体氮化硬度>450"=>['min'=>480,'max'=>550, 'a'=>25],
    "氮化钢(无铝钢)，HBS>500"=>['min'=>480,'max'=>550, 'a'=>26]
];
$k = $_POST['cl'];
$a  = $HBS[$k]['min']+$HBS[$k]['max'];
$data = $HBS[$k];
$data['a'] = round($a/2);
echo json_encode($data);